From 87e29c99d72e480149d7b9c66d070d8d60d3fbef Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Sep 2010 22:29:33 -0400 Subject: [PATCH] Add a migration guide section on GtkObject --- docs/reference/gtk/migrating-2to3.xml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml index a91897af57..ab883c730c 100644 --- a/docs/reference/gtk/migrating-2to3.xml +++ b/docs/reference/gtk/migrating-2to3.xml @@ -585,6 +585,35 @@ gtk_arrow_draw (GtkWidget *widget, value, you will have explicitly set it explicitly. + +
+ GtkObject is gone + + + GtkObject has been removed in GTK+ 3. Its remaining functionality, + the ::destroy signal, has been moved to GtkWidget. If you have non-widget + classes that are directly derived from GtkObject, you have to make + them derive from #GInitiallyUnowned (or, if you don't need the floating + functionality, #GObject). If you have widgets that override the + destroy class handler, you have to adust your class_init function, + since destroy is now a member of GtkWidgetClass: + + GtkObjectClass *object_class = GTK_OBJECT_CLASS (class); + + object_class->destroy = my_destroy; + + becomes + + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + widget_class->destroy = my_destroy; + + In the unlikely case that you have a non-widget class that is derived + from GtkObject and makes use of the destroy functionality, you have + to implement ::destroy yourself. + +
+
Prevent mixed linkage -- 2.30.2